import request from '@/utils/request'

let shopPageSettingApi = {
//  新版商城设置
// 保存设置
decorationInfoAddNew(data) {
  return request({
    url: '/tenantPageSet',
    method: 'post',
    data
  })
},
 // 修改配置
 decorationTypeEditNew(data) {
  return request({
    url: '/tenantPageSet',
    method: 'put',
    data
  })
},
// 查询租户的配置
decorationTypeListNew(query) {
  return request({
    url: '/tenantPageSet/getTenantPageSet',
    method: 'get',
    params: query
  })
},
// 查询默认配置
getDefaultPageSet(query) {
  return request({
    url: '/web/getDefaultPageSet',
    method: 'get',
    params: query
  })
},


  // 以下废弃
  // 查询当前租户下所有页面配置
  decorationTypeList(query) {
    return request({
      url: '/decorationType/list',
      method: 'get',
      params: query
    })
  },
  // 修改配置区域类型
  decorationTypeEdit(data) {
    return request({
      url: '/decorationType',
      method: 'put',
      data
    })
  },
  // 新增页面配置信息
  decorationInfoAdd(data) {
    return request({
      url: '/decorationInfo',
      method: 'post',
      data
    })
  },
  // 修改页面配置信息
  decorationInfoEdit(data) {
    return request({
      url: '/decorationInfo',
      method: 'put',
      data
    })
  },
  // 删除页面配置信息
  decorationInfoDel(ids) {
    return request({
      url: `/decorationInfo/${ids}`,
      method: 'delete'
    })
  },
  // 查询页面配置信息
  getDecorationInfo(ids) {
    return request({
      url: `/decorationInfo/${ids}`,
      method: 'get'
    })
  }
}
export default shopPageSettingApi;

